package com.hildeberto.versions.repository;

import com.hildeberto.versions.model.svn.Entry;
import com.hildeberto.versions.model.svn.Status;
import com.hildeberto.versions.util.CommandLine;
import com.hildeberto.versions.util.Repository;

import java.util.List;

public enum StatusRepo {

    INSTANCE;

    public List<Entry> listStatusEntries() {
        String commandResult = CommandLine.MANAGER.getResult("svn status --xml");
        Status status = Repository.FACTORY.unmarshal(Status.class, commandResult);
        return status.getTarget().getEntry();
    }
}
